import {METHOD, request} from "@/utils/request";
import {USER, UPDATE_USER_STATUS} from "@/services/api";

export async function getUsers(pageNum = 1, pageSize = 15, queryStr = '') {
    return request(USER + `?pageNum=${pageNum}&pageSize=${pageSize}&queryStr=${queryStr}`, METHOD.GET)
}

export async function changeUserStatus(userId, status) {
    let param = {userId: userId, status: status}
    return request(UPDATE_USER_STATUS, METHOD.PUT,param)
}

export default {
    getUsers,
    changeUserStatus
}